<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>Class application\core\components\Upgrade | IBOS open source</title>

	<link rel="stylesheet" href="resources/bootstrap.min.css?973e37a8502921d56bc02bb55321f45b072b6f71">
	<link rel="stylesheet" href="resources/style.css?49f43d3208c5d7e33fa16d36107a345bf11cc00d">

</head>

<body>
	<nav id="navigation" class="navbar navbar-default navbar-fixed-top">
		<div class="container-fluid">
			<div class="navbar-header">
				<a href="index.html" class="navbar-brand">IBOS open source</a>
			</div>
			<div class="collapse navbar-collapse">

                <form id="search" class="navbar-form navbar-left" role="search">
                    <input type="hidden" name="cx" value="">
                    <input type="hidden" name="ie" value="UTF-8">
                    <div class="form-group">
                        <input type="text" name="q" class="search-query form-control" placeholder="Search">
					</div>
				</form>

				<ul class="nav navbar-nav">
					<li>
						<a href="namespace-application.core.components.html" title="Summary of application\core\components"><span>Namespace</span></a>
					</li>
					<li class="active">
<span>Class</span>					</li>





				</ul>
			</div>
		</div>
	</nav>

	<div id="left">
	<div id="menu">

		<div id="groups">
				<h3>Namespaces</h3>
			<ul>
					<li class="active">
						<a href="namespace-application.html">
							application<span></span>
						</a>
							<ul>
					<li class="active">
						<a href="namespace-application.core.html">
							core<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.core.cache.html">
							cache<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.core.cache.driver.html">
							driver						</a>
							</li>
					<li>
						<a href="namespace-application.core.cache.provider.html">
							provider						</a>
							</li>
								</ul></li>
					<li class="active">
						<a href="namespace-application.core.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.core.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.core.engines.html">
							engines<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.core.engines.local.html">
							local						</a>
							</li>
					<li>
						<a href="namespace-application.core.engines.sae.html">
							sae						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.core.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.core.modules.html">
							modules						</a>
							</li>
					<li>
						<a href="namespace-application.core.utils.html">
							utils						</a>
							</li>
					<li>
						<a href="namespace-application.core.widgets.html">
							widgets						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.html">
							modules<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.article.html">
							article<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.article.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.article.core.html">
							core						</a>
							</li>
					<li>
						<a href="namespace-application.modules.article.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.article.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.calendar.html">
							calendar<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.calendar.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.calendar.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.calendar.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.contact.html">
							contact<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.contact.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.contact.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.contact.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.dashboard.html">
							dashboard<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.dashboard.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.dashboard.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.dashboard.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.department.html">
							department<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.department.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.modules.department.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.department.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.diary.html">
							diary<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.diary.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.modules.diary.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.diary.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.diary.utils.html">
							utils						</a>
							</li>
					<li>
						<a href="namespace-application.modules.diary.widgets.html">
							widgets						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.email.html">
							email<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.email.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.email.core.html">
							core						</a>
							</li>
					<li>
						<a href="namespace-application.modules.email.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.email.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.main.html">
							main<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.main.behaviors.html">
							behaviors						</a>
							</li>
					<li>
						<a href="namespace-application.modules.main.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.modules.main.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.main.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.main.utils.html">
							utils						</a>
							</li>
					<li>
						<a href="namespace-application.modules.main.widgets.html">
							widgets						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.message.html">
							message<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.message.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.message.core.html">
							core<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.message.core.co.html">
							co						</a>
							</li>
					<li>
						<a href="namespace-application.modules.message.core.wx.html">
							wx<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.message.core.wx.callback.html">
							callback						</a>
							</li>
					<li>
						<a href="namespace-application.modules.message.core.wx.event.html">
							event						</a>
							</li>
								</ul></li></ul></li>
					<li>
						<a href="namespace-application.modules.message.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.message.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.mobile.html">
							mobile<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.mobile.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.modules.mobile.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.mobile.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.position.html">
							position<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.position.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.modules.position.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.position.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.recruit.html">
							recruit<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.recruit.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.modules.recruit.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.recruit.core.html">
							core						</a>
							</li>
					<li>
						<a href="namespace-application.modules.recruit.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.recruit.utils.html">
							utils						</a>
							</li>
					<li>
						<a href="namespace-application.modules.recruit.widgets.html">
							widgets						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.role.html">
							role<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.role.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.role.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.user.html">
							user<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.user.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.modules.user.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.user.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.user.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.vote.html">
							vote<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.vote.components.html">
							components						</a>
							</li>
					<li>
						<a href="namespace-application.modules.vote.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.vote.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.vote.utils.html">
							utils						</a>
							</li>
								</ul></li>
					<li>
						<a href="namespace-application.modules.weibo.html">
							weibo<span></span>
						</a>
							<ul>
					<li>
						<a href="namespace-application.modules.weibo.controllers.html">
							controllers						</a>
							</li>
					<li>
						<a href="namespace-application.modules.weibo.core.html">
							core						</a>
							</li>
					<li>
						<a href="namespace-application.modules.weibo.model.html">
							model						</a>
							</li>
					<li>
						<a href="namespace-application.modules.weibo.utils.html">
							utils						</a>
							</li>
								</ul></li></ul></li></ul></li>
			</ul>
		</div>


		<div id="elements">
			<h3>Classes</h3>
			<ul>
				<li><a href="class-application.core.components.Application.html">Application</a></li>
				<li><a href="class-application.core.components.AssetManager.html">AssetManager</a></li>
				<li><a href="class-application.core.components.Attach.html">Attach</a></li>
				<li><a href="class-application.core.components.AuthManager.html">AuthManager</a></li>
				<li><a href="class-application.core.components.Browser.html">Browser</a></li>
				<li><a href="class-application.core.components.Cache.html">Cache</a></li>
				<li><a href="class-application.core.components.Category.html">Category</a></li>
				<li><a href="class-application.core.components.Engine.html">Engine</a></li>
				<li><a href="class-application.core.components.Log.html">Log</a></li>
				<li><a href="class-application.core.components.MessageSource.html">MessageSource</a></li>
				<li><a href="class-application.core.components.PerformanceMeasurement.html">PerformanceMeasurement</a></li>
				<li><a href="class-application.core.components.PlugManager.html">PlugManager</a></li>
				<li><a href="class-application.core.components.Request.html">Request</a></li>
				<li><a href="class-application.core.components.ThemeManager.html">ThemeManager</a></li>
				<li class="active"><a href="class-application.core.components.Upgrade.html">Upgrade</a></li>
				<li><a href="class-application.core.components.Upload.html">Upload</a></li>
			</ul>





		</div>
	</div>
</div>

<div id="splitter"></div>

<div id="right">
	<div id="rightInner">
<div id="content" class="class">
	<h1>Class Upgrade</h1>











	<div class="alert alert-info">
		
		
		<b>Namespace:</b> <a href="namespace-application.html">application</a>\<a href="namespace-application.core.html">core</a>\<a href="namespace-application.core.components.html">components</a><br>
		

			<b>Located at</b> system/core/components/Upgrade.php		<br>
	</div>



		<div class="panel panel-default">
			<div class="panel-heading"><h2>Methods summary</h2></div>
			<table class="summary table table-bordered table-striped methods" id="methods">
		<tr data-order="fetchUpdateFileList" id="_fetchUpdateFileList">

			<td class="attributes"><code>
				 public 
				array
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_fetchUpdateFileList">#</a>
			<code>fetchUpdateFileList( <span>array <var>$upgradeInfo</var></span> )</code>

			<div class="description short">
				<p>获取更新文件列表 原名fetch_updatefile_list</p>
			</div>

			<div class="description detailed hidden">
				<p>获取更新文件列表 原名fetch_updatefile_list</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$upgradeInfo</var></dt>
						<dd>版本信息</dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						array<br>array('file'=>文件名列表, 'md5'=>每个文件对应的md5码)
					</div>


					<h4>Author</h4>
					<div class="list">
							Ring<br>
					</div>


			</div>
			</div></td>
		</tr>
		<tr data-order="compareBaseFile" id="_compareBaseFile">

			<td class="attributes"><code>
				 public 
				array
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_compareBaseFile">#</a>
			<code>compareBaseFile( <span>array <var>$upgradeInfo</var></span>, <span>array <var>$upgradeFileList</var></span> )</code>

			<div class="description short">
				<p>对比文件，筛选出需要更新的文件列表 原名compare_basefile</p>
			</div>

			<div class="description detailed hidden">
				<p>对比文件，筛选出需要更新的文件列表 原名compare_basefile</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$upgradeInfo</var></dt>
						<dd>更新信息</dd>
						<dt><var>$upgradeFileList</var></dt>
						<dd>需要更新的文件列表</dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						array<br>array(需要更新的文件列表, 不需要更新的文件列表, 被忽略的文件列表（不存在或者被忽略的文件）)
					</div>


					<h4>Author</h4>
					<div class="list">
							Ring<br>
					</div>


			</div>
			</div></td>
		</tr>
		<tr data-order="compareFileContent" id="_compareFileContent">

			<td class="attributes"><code>
				 public 
				boolean
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_compareFileContent">#</a>
			<code>compareFileContent( <span>string <var>$file</var></span>, <span>string <var>$remoteFile</var></span> )</code>

			<div class="description short">
				<p>原名compare_file_content</p>
			</div>

			<div class="description detailed hidden">
				<p>原名compare_file_content</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$file</var></dt>
						<dd></dd>
						<dt><var>$remoteFile</var></dt>
						<dd></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						boolean
					</div>


					<h4>Author</h4>
					<div class="list">
							Ring<br>
					</div>


			</div>
			</div></td>
		</tr>
		<tr data-order="checkUpgrade" id="_checkUpgrade">

			<td class="attributes"><code>
				 public 
				boolean
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_checkUpgrade">#</a>
			<code>checkUpgrade( )</code>

			<div class="description short">
				<p>检查更新信息，这些信息将被记录在setting中的upgrade中</p>
			</div>

			<div class="description detailed hidden">
				<p>检查更新信息，这些信息将被记录在setting中的upgrade中</p>



					<h4>Returns</h4>
					<div class="list">
						boolean
					</div>


					<h4>Author</h4>
					<div class="list">
							Ring<br>
					</div>


			</div>
			</div></td>
		</tr>
		<tr data-order="checkFolderPerm" id="_checkFolderPerm">

			<td class="attributes"><code>
				 public 
				boolean
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_checkFolderPerm">#</a>
			<code>checkFolderPerm( <span>array <var>$updateFileList</var></span> )</code>

			<div class="description short">
				<p>原名check_folder_perm</p>
			</div>

			<div class="description detailed hidden">
				<p>原名check_folder_perm</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$updateFileList</var></dt>
						<dd></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						boolean
					</div>


					<h4>Author</h4>
					<div class="list">
							Ring<br>
					</div>


			</div>
			</div></td>
		</tr>
		<tr data-order="testWritAble" id="_testWritAble">

			<td class="attributes"><code>
				 public 
				integer
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_testWritAble">#</a>
			<code>testWritAble( <span>string <var>$dir</var></span> )</code>

			<div class="description short">
				<p>测试是否有写文件的权限，有返回1 原名test_writable</p>
			</div>

			<div class="description detailed hidden">
				<p>测试是否有写文件的权限，有返回1 原名test_writable</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$dir</var></dt>
						<dd></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						integer
					</div>


					<h4>Author</h4>
					<div class="list">
							Ring<br>
					</div>


			</div>
			</div></td>
		</tr>
		<tr data-order="downloadFile" id="_downloadFile">

			<td class="attributes"><code>
				 public 
				boolean|integer
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_downloadFile">#</a>
			<code>downloadFile( <span>array <var>$upgradeInfo</var></span>, <span>string <var>$file</var></span>, <span>string <var>$folder</var> = <span class="php-quote">'upload'</span></span>, <span>string <var>$md5</var> = <span class="php-quote">''</span></span>, <span>integer <var>$position</var> = <span class="php-num">0</span></span>, <span>integer <var>$offset</var> = <span class="php-num">0</span> </span> )</code>

			<div class="description short">
				<p>下载文件 原名download_file</p>
			</div>

			<div class="description detailed hidden">
				<p>下载文件 原名download_file</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$upgradeInfo</var></dt>
						<dd>更新信息</dd>
						<dt><var>$file</var></dt>
						<dd>文件名(包括目录名)</dd>
						<dt><var>$folder</var></dt>
						<dd>目录名，此目录名并不是指本地，而是官方服务器的目录</dd>
						<dt><var>$md5</var></dt>
						<dd>md5码</dd>
						<dt><var>$position</var></dt>
						<dd>$position 文件指针，指定文件指针后，下载器将从这个指针开始下载</dd>
						<dt><var>$offset</var></dt>
						<dd>$offset 指定本文内容长度，仅仅检验下载文件的长度是否和$offset相等，如果相等将不执行md5检验</dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						boolean|integer<br>0 md5检验失败   1 断点文件下载成功  2 md5检验成功（文件完全下载完成才会进行）
					</div>


					<h4>Author</h4>
					<div class="list">
							Ring<br>
					</div>


			</div>
			</div></td>
		</tr>
		<tr data-order="mkdirs" id="_mkdirs">

			<td class="attributes"><code>
				 public 
				boolean
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_mkdirs">#</a>
			<code>mkdirs( <span>string <var>$dir</var></span> )</code>

			<div class="description short">
				<p>新建目录</p>
			</div>

			<div class="description detailed hidden">
				<p>新建目录</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$dir</var></dt>
						<dd></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						boolean
					</div>


					<h4>Author</h4>
					<div class="list">
							Ring<br>
					</div>


			</div>
			</div></td>
		</tr>
		<tr data-order="copyFile" id="_copyFile">

			<td class="attributes"><code>
				 public 
				boolean
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_copyFile">#</a>
			<code>copyFile( <span>string <var>$srcFile</var></span>, <span>string <var>$desFile</var></span>, <span>string <var>$type</var></span> )</code>

			<div class="description short">
				<p>原名copy_file</p>
			</div>

			<div class="description detailed hidden">
				<p>原名copy_file</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$srcFile</var></dt>
						<dd></dd>
						<dt><var>$desFile</var></dt>
						<dd></dd>
						<dt><var>$type</var></dt>
						<dd></dd>
					</dl></div>

					<h4>Returns</h4>
					<div class="list">
						boolean
					</div>


					<h4>Author</h4>
					<div class="list">
							Ring<br>
					</div>


			</div>
			</div></td>
		</tr>
		<tr data-order="versionPath" id="_versionPath">

			<td class="attributes"><code>
				 public 
				string
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_versionPath">#</a>
			<code>versionPath( )</code>

			<div class="description short">
				<p>versionPath</p>
			</div>

			<div class="description detailed hidden">
				<p>versionPath</p>



					<h4>Returns</h4>
					<div class="list">
						string
					</div>




			</div>
			</div></td>
		</tr>
		<tr data-order="copyDir" id="_copyDir">

			<td class="attributes"><code>
				 public 
				
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_copyDir">#</a>
			<code>copyDir( <span>string <var>$srcDir</var></span>, <span>string <var>$destDir</var></span> )</code>

			<div class="description short">
				<p>复制目录</p>
			</div>

			<div class="description detailed hidden">
				<p>复制目录</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$srcDir</var></dt>
						<dd></dd>
						<dt><var>$destDir</var></dt>
						<dd></dd>
					</dl></div>





			</div>
			</div></td>
		</tr>
		<tr data-order="rmdirs" id="_rmdirs">

			<td class="attributes"><code>
				 public 
				
				
				</code>
			</td>

			<td class="name"><div>
			<a class="anchor" href="#_rmdirs">#</a>
			<code>rmdirs( <span>string <var>$srcDir</var></span> )</code>

			<div class="description short">
				<p>删除目录</p>
			</div>

			<div class="description detailed hidden">
				<p>删除目录</p>


					<h4>Parameters</h4>
					<div class="list"><dl>
						<dt><var>$srcDir</var></dt>
						<dd></dd>
					</dl></div>





			</div>
			</div></td>
		</tr>
			</table>
		</div>











</div>
	</div>

	<div id="footer">
		IBOS open source API documentation generated by <a href="http://apigen.org">ApiGen</a>
	</div>
</div>
<script src="resources/combined.js"></script>
<script src="elementlist.js"></script>
</body>
</html>
